package com.claire.jing.Entity;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

public class Member {
    private int id;
    @NotNull(message = "用户名不能为空")
    private String userName;
    @NotNull(message = "密码不能为空")
    @Size(min = 6,max = 10,message = "密码必须为6-10位")
    private String pwd;
    private String mobilePhone;
    private int memberType;
    private Date regTime;

    public Member(int id, String userName, String pwd, String mobilePhone, int memberType, Date regTime) {
        this.id = id;
        this.userName = userName;
        this.pwd = pwd;
        this.mobilePhone = mobilePhone;
        this.memberType = memberType;
        this.regTime = regTime;
    }


    public Member() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public int getMemberType() {
        return memberType;
    }

    public void setMemberType(int memberType) {
        this.memberType = memberType;
    }

    public Date getRegTime() {
        return regTime;
    }

    public void setRegTime(Date regTime) {
        this.regTime = regTime;
    }

    @Override
    public String toString() {
        return "Member{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", pwd='" + pwd + '\'' +
                ", mobilePhone='" + mobilePhone + '\'' +
                ", memberType='" + memberType + '\'' +
                ", regTime=" + regTime +
                '}';
    }
}
